#include "Acceleration.h"

//Default CTOR
Acceleration::Acceleration()
	: m_accel(0), m_change(0), m_stepping(1) {
}

//Accel CTOR
Acceleration::Acceleration( float accel )
	: m_accel(accel), m_change(0), m_stepping(1) {
}

//Accel + change CTOR
Acceleration::Acceleration( float accel, float change )
	: m_accel(accel), m_change(change), m_stepping(1) {
}

//Accel + change + stepping CTOR
Acceleration::Acceleration( float accel, float change, int stepping )
	: m_accel(accel), m_change(change), m_stepping(stepping) {
}

//Copy CTOR
Acceleration::Acceleration( const Acceleration & copy )
	: m_accel(copy.m_accel), m_change(copy.m_change), m_stepping(copy.m_stepping) {
}

const Acceleration & Acceleration::operator=( const Acceleration & rhs) {
	m_accel		= rhs.m_accel;
	m_change	= rhs.m_change;
	m_stepping	= rhs.m_stepping;
	return *this;
}
	

//Setter for Acceleration
void Acceleration::SetAccel( float accel ) {
	m_accel = accel;
}

//Setter for the Change
void Acceleration::SetChange( float change ) {
	m_change = change;
}

//Setter for the Stepping
void Acceleration::SetStepping( int stepping ) {
	m_stepping = stepping;
}

float Acceleration::Tick() {
	return m_accel += ( m_change / m_stepping );
}